<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page language="java" import="recommenRatings.domain.*,java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String name = request.getParameter("place");
	PlaceManager pm = new PlaceManager(name);
	Collection<Place> places = pm.getPlace(); //TODO
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Lugares</title>
</head>
<body>



<b>LUGARES</b>
<%
	if (places.size() < 1) {
%>
<h3>No hay registrado ningun lugar con esas caracteristicas</h3>
<a href='searchByName.jsp'>Volver a buscar</a>
<%
	} else {

		for (Place p : places) {//TODO
%>
<table summary="Listado de Lugares">
	<br>

	<tr>
		<td><%=p.getName()%></td>
	</tr>
	<tr>
		<td><%=p.getAddress()%></td>
	</tr>
	<tr>
		<td><%=p.getCity()%></td>
	</tr>
	<tr>
		<td><%=p.getState()%></td>
	</tr>
	<tr>
		<%
			//TODO Redireccionar para ver mas informacion
		%>
		<td><a href="FrontController?res=desc.jsp?pid=<%=p.getPlaceID()%>">Ver
		mas</td>
	</tr>

	<br>
	<%
		}
		}
	%>

</table>

<a href="FrontController?res=searchPlace.jsp">Volver atras</a>

</body>
</html>